import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('../views/Home/Home.vue')
const AboutWe = () => import('../views/AboutWe/AboutWe.vue')
const Mine = () => import('../views/Mine/Mine.vue')
const MyProject = () =>import('../views/Mine/MyProject/MyProject.vue')
const CreateExam = () =>import('../views/CreateExam/CreateExam.vue')
const FreeTemplate = () =>import('../views/FreeTemplate/FreeTemplate.vue')
const Login = () => import('../components/Login/Login')
const Register = () => import('../components/Register/Register')
const PublishProject = () => import('../views/PublishProject/PublishProject')
const DataReport = () => import('../views/DataReport/DataReport')
const EditPage = () => import('../views/EditPage/EditPage')
const Preview = () => import('../views/Show/Preview')
const PSIndex = () => import('../views/Show/PublishShow/PSIndex')
const Phone = () => import('../views/AnswerSheet/Phone')
const JudgeScore = () => import('../views/DataReport/Answer/JudgeScore')
const AnswerDetail = () => import('../views/DataReport/Answer/AnswerDetail')
const PC = () => import('../views/AnswerSheet/PC');
const Spc = () => import('../views/AnswerSheet/show/Spc')
const Sphone = () => import('../views/AnswerSheet/show/Sphone')
Vue.use(VueRouter);

export default new VueRouter({
    routes: [
        {
            path: '/',
            redirect: '/Home'
        },
        {
            path: '/Home',
            component: Home,
        },
        {
            path: '/AboutWe',
            component: AboutWe
        },
        {
            path: '/CreateExam',
            component: CreateExam,
        },
        {
            path: '/Mine',
            component: Mine,
            redirect: '/Mine/MyProject',
            children: [
                {
                    path: 'MyProject',
                    component: MyProject
                },
                {
                    path: '/FreeTemplate',
                    component: FreeTemplate
                }
            ]
        },
        {
            path: '/Login',
            component: Login
        },
        {
            path: '/Register',
            component: Register
        },
        {
            path: '/PublishProject',
            component: PublishProject
        },
        {
            path: '/DataReport',
            component: DataReport
        },
        {
            path: '/EditPage',
            component: EditPage
        },
        {
            path: '/Preview',
            component: Preview
        },
        {
            path: '/PSIndex',
            component: PSIndex
        },
        {
            path: '/Phone/:id',
            component: Phone
        },
        {
            path: '/JudgeScore',
            component: JudgeScore
        },
        {
            path: '/AnswerDetail',
            component: AnswerDetail
        },
        {
            path: '/PC/:id',
            component: PC
        },
        {
            path: '/Spc',
            component: Spc
        },
        {
            path:'/Sphone',
            component: Sphone
        }
    ]
})
